package g4p.tests;

import g4p_controls.*;
import processing.core.PApplet;

public class WindowExpTest extends PApplet {

	public void setup(){
		size(480, 320);
		createGUI();

	}

	public void draw(){

	}



	/* =========================================================
	 * ====                   WARNING                        ===
	 * =========================================================
	 * The code in this tab has been generated from the GUI form
	 * designer and care should be taken when editing this file.
	 * Only add/edit code inside the event handlers i.e. only
	 * use lines between the matching comment tags. e.g.

		 void myBtnEvents(GButton button) { //_CODE_:button1:12356:
		     // It is safe to enter your event code here  
		 } //_CODE_:button1:12356:

	 * Do not rename this tab!
	 * =========================================================
	 */

	public void textfield1_change1(GTextField source, GEvent event) { //_CODE_:textfield1:971680:
		println("textfield1 - GTextField event occured " + System.currentTimeMillis()%10000000 );
	} //_CODE_:textfield1:971680:

	public void button1_click1(GButton source, GEvent event) { //_CODE_:button1:652347:
		println("button1 - GButton event occured " + System.currentTimeMillis()%10000000 );
	} //_CODE_:button1:652347:

	public void button2_click1(GButton source, GEvent event) { //_CODE_:button2:218684:
		println("button2 - GButton event occured " + System.currentTimeMillis()%10000000 );
	} //_CODE_:button2:218684:

	synchronized public void win_draw1(GWinApplet appc, GWinData data) { //_CODE_:window1:987016:
		appc.background(230);
	} //_CODE_:window1:987016:

	public void button3_click1(GButton source, GEvent event) { //_CODE_:button3:399616:
		println("button3 - GButton event occured " + System.currentTimeMillis()%10000000 );
	} //_CODE_:button3:399616:

	public void button4_click1(GButton source, GEvent event) { //_CODE_:button4:425051:
		println("button4 - GButton event occured " + System.currentTimeMillis()%10000000 );
	} //_CODE_:button4:425051:

	public void dropList1_click1(GDropList source, GEvent event) { //_CODE_:dropList1:784715:
		println("dropList1 - GDropList event occured " + System.currentTimeMillis()%10000000 );
	} //_CODE_:dropList1:784715:



	// Create all the GUI controls. 
	// autogenerated do not edit
	public void createGUI(){
		G4P.messagesEnabled(false);
		G4P.setGlobalColorScheme(GCScheme.BLUE_SCHEME);
		G4P.setCursor(ARROW);
		if(frame != null)
			frame.setTitle("Sketch Window");
		textfield1 = new GTextField(this, 160, 145, 160, 30, G4P.SCROLLBARS_NONE);
		textfield1.setOpaque(true);
		textfield1.addEventHandler(this, "textfield1_change1");
		label1 = new GLabel(this, 260, 70, 80, 20);
		label1.setText("My label");
		label1.setOpaque(false);
		button1 = new GButton(this, 85, 73, 80, 30);
		button1.setText("Face text");
		button1.addEventHandler(this, "button1_click1");
		button2 = new GButton(this, 68, 197, 80, 36);
		button2.setText("Face text");
		button2.addEventHandler(this, "button2_click1");
		sketchPad1 = new GSketchPad(this, 333, 120, 142, 176);
		sketchPad1.setOpaque(false);
		window1 = new GWindow(this, "Window title", 50, 40, 240, 120, false, JAVA2D);
		window1.addDrawHandler(this, "win_draw1");
		button3 = new GButton(window1.papplet, 17, 12, 80, 30);
		button3.setText("Face text");
		button3.addEventHandler(this, "button3_click1");
		button4 = new GButton(window1.papplet, 20, 59, 80, 30);
		button4.setText("Face text");
		button4.addEventHandler(this, "button4_click1");
		dropList1 = new GDropList(window1.papplet, 131, 34, 90, 66, 3);
		dropList1.setItems(loadStrings("g4p/list_784715"), 0);
		dropList1.addEventHandler(this, "dropList1_click1");
	}

	// Variable declarations 
	// autogenerated do not edit
	GTextField textfield1; 
	GLabel label1; 
	GButton button1; 
	GButton button2; 
	GSketchPad sketchPad1; 
	GWindow window1;
	GButton button3; 
	GButton button4; 
	GDropList dropList1; 

}
